static void gtk_combo_box_constructed (GObject *object);
static void gtk_combo_box_dispose (GObject *object);
static void gtk_combo_box_unmap (GtkWidget *widget);
-static void gtk_combo_box_destroy (GtkWidget *widget);
static void gtk_combo_box_set_property (GObject *object,
guint prop_id,
widget_class->measure = gtk_combo_box_measure;
widget_class->size_allocate = gtk_combo_box_size_allocate;
widget_class->unmap = gtk_combo_box_unmap;
- widget_class->destroy = gtk_combo_box_destroy;
widget_class->compute_expand = gtk_combo_box_compute_expand;
object_class = (GObjectClass *)klass;
GTK_WIDGET_CLASS (gtk_combo_box_parent_class)->unmap (widget);
}
-static void
-gtk_combo_box_destroy (GtkWidget *widget)
-{
- GtkComboBox *combo_box = GTK_COMBO_BOX (widget);
- GtkComboBoxPrivate *priv = gtk_combo_box_get_instance_private (combo_box);
-
- if (priv->popup_idle_id > 0)
- {
- g_source_remove (priv->popup_idle_id);
- priv->popup_idle_id = 0;
- }
-
- if (priv->box)
- {
- /* destroy things (unparent will kill the latest ref from us)
- * last unref on button will destroy the arrow
- */
- gtk_widget_unparent (priv->box);
- priv->box = NULL;
- priv->button = NULL;
- priv->arrow = NULL;
- priv->child = NULL;
- priv->cell_view = NULL;
- }
-
- if (priv->row_separator_destroy)
- priv->row_separator_destroy (priv->row_separator_data);
-
- priv->row_separator_func = NULL;
- priv->row_separator_data = NULL;
- priv->row_separator_destroy = NULL;
-
- GTK_WIDGET_CLASS (gtk_combo_box_parent_class)->destroy (widget);
- priv->cell_view = NULL;
-}
-
static void
gtk_combo_box_entry_contents_changed (GtkEntry *entry,
gpointer user_data)
GtkComboBox *combo_box = GTK_COMBO_BOX (object);
GtkComboBoxPrivate *priv = gtk_combo_box_get_instance_private (combo_box);
+ if (priv->popup_idle_id > 0)
+ {
+ g_source_remove (priv->popup_idle_id);
+ priv->popup_idle_id = 0;
+ }
+
+ if (priv->box)
+ {
+ /* destroy things (unparent will kill the latest ref from us)
+ * last unref on button will destroy the arrow
+ */
+ gtk_widget_unparent (priv->box);
+ priv->box = NULL;
+ priv->button = NULL;
+ priv->arrow = NULL;
+ priv->child = NULL;
+ priv->cell_view = NULL;
+ }
+
+ if (priv->row_separator_destroy)
+ priv->row_separator_destroy (priv->row_separator_data);
+
+ priv->row_separator_func = NULL;
+ priv->row_separator_data = NULL;
+ priv->row_separator_destroy = NULL;
+
if (priv->popup_widget)
{
/* Stop menu destruction triggering toggle on a now-invalid button */